package oo.day05.union;

public class test {

	public static void main(String[] args) {
		RaceCar racer = new RaceCar();
		Car car = new RaceCar();
		Vehicle vehicle = new RaceCar();
		System.out.println(racer.speed() + "," + car.speed() + "," + vehicle.speed());
	}

}

abstract class Vehicle{
//	abstract void test();
	public int speed() {
		return 0;
	}
}

class Car extends Vehicle{
	public int speed() {
		return 60;
	}
//	void test() {};
}

class RaceCar extends Car{
	public int speed() {
		return 150;
	}
}

